package com.wz.service.impl;

import com.wz.entity.Emp;
import com.wz.mapper.EmpMapper;
import com.wz.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EmpServiceImpl implements EmpService {
    @Autowired
    private EmpMapper empMapper;

    @Override
    public List<Emp> findEmp() {
        return empMapper.findEmp();
    }

    @Override
    public int save(Emp emp) {
        return empMapper.saveEmp(emp);
    }

    @Override
    public Integer delete(String empno) {
        return empMapper.deleteEmp(empno);
    }

    @Override
    public Emp get(String empno) {
        return empMapper.getEmpById(empno);
    }

    @Override
    public int update(Emp emp) {
        return empMapper.updateEmp(emp);
    }
}
